<%@ page language="java"  pageEncoding="utf-8"%>
<%@ page import="com.ejoysoft.wlanyz.business.Ac,com.ejoysoft.wlanyz.business.Paper,java.util.ArrayList,com.ejoysoft.common.Constants,com.ejoysoft.common.exception.NoRightException" %>
<%@page import="java.util.Vector"%>
<%@ include file="../include/jsp/head.jsp"%>


<%
    if(!globa.userSession.hasRight("40010"))
      throw new NoRightException("用户不具备操作该功能模块的权限，请与系统管理员联系！");
    //  String strId = ParamUtil.getString(request,"strId","");
      String strHotSpotId = ParamUtil.getString(request,"strHotSpotId","");
      //System.out.println("00000000000000000"+classtwoac);
      Paper pObj = new Paper(globa);
 	  Paper pObj0 = pObj.show(" where strid = '" + strHotSpotId + "'");
 	  Vector<String> floors = pObj.getFloors(" where acname = '"+strHotSpotId+"'");
      Ac obj1 = new Ac(globa);
 	  Ac obj0 = obj1.show(" where strid = '" +strHotSpotId+ "'");
%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
<link href="../css/main.css" rel="stylesheet" type="text/css" />
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><style type="text/css">
<!--
body {
	background-color: #f2f8ff;
}
.sel1{ width:160px;}
.STYLE1 {color: #FF0000}
.s6 a:link{ line-height:25px;height:25px; color:#333333}
.s6 a:hover{ line-height:25px;height:25px; color:#333333}
-->
</style>
 <link href="../jquerytable/Styles/Site.css" rel="stylesheet" type="text/css" />
    <script src="../jquerytable/Scripts/jquery-1.4.1.min.js" type="text/javascript"></script>
    <script src="../jquerytable/Scripts/JQueryPlugin/TableSort.js" type="text/javascript"></script>
    <script language="JavaScript" src="../include/date/popc.js"></script>
	<script src="../include/js/list.js"></script>
    <script type="text/javascript">
var i1 = 1;
var count = 1;

     function chkFrm() {
   // for(var d=0;d<5;d++)alert(d);
       
        var num= 0;
        for(var d = 1;d<i1;d++)
        {
        if(!(window.document.getElementById("file"+d)==null))
        {
        if(!(document.getElementById("file"+d).value==""))num++;
       //alert(document.getElementById("file"+d).value)
       }
       }  
       if(document.getElementById("firstFileId").value != "")
       {
       		num++;
       		count++;
       }
        if(document.getElementById("strXML").value!=""&&num==0){
        alert("请添加要上传的图纸！！！")
        return false;
        }
        if(document.getElementById("strXML").value==""&&num==0){
        alert("请先确定您的操作！！！")
        return false;
        }
        document.getElementById("papernum").value = count-1;
       	frm1.submit();
    }
</script>
<script>
function addFile(dvID, inputNamePrefix)
{

var dv = document.getElementById(dvID);
var file = document.createElement("input");
file.type = "file";
file.size = "30";
file.id = file.name = inputNamePrefix + i1;
dv.appendChild(file);

var btn = document.createElement("input");
btn.type = "button";
btn.id = btn.name = "btn" + i1;
btn.value = "删除" ;

btn.onclick = function() {
var b = document.getElementById(btn.id);
dv.removeChild(b.nextSibling); //remove <BR>
dv.removeChild(b.previousSibling); //file
dv.removeChild(b); //btn
count--;
}
dv.appendChild(btn);
dv.appendChild(document.createElement("BR"));
i1++;
count++;
}
 function del(){
	if (iCheckedNumber(document.all.strId) == 0) {
		alert("请先选择要删除的记录！");
		return;
	}
    if(!confirm('您是否确认要删除所选中的所有记录？'))
        return;
     frm.action="paper_act.jsp";
     frm.submit();
} 

</script>

</head>


<body>
<table width="97%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="30"><img src="../images/ri_list.jpg" width="14" height="14" align="bottom" />&nbsp;您现在所在的位置：<font color="#0e7cc9">首页</font> &gt; 图纸管理&gt;图纸修改</td>
  </tr>
   <tr>
  	<td align="right" style="font-size: 13px">
	<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" style="margin:10px 0px 2px 0px;">
       <tr>
	     <td align="center"  class="listdrd" bgcolor="e1eef7"style="font-size: 15px">
		      <strong>一级热点：<%=obj0.getClassOneAC() %></strong> 
		</td>
		<td align="center"class="listdrd"  bgcolor="e1eef7"style="font-size: 15px">
		      <strong>二级热点：<%=obj0.getClassTwoAC() %></strong> 
		</td>
		<td></td>
        </tr>
        
       </table> 
       <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" style="margin:10px 0px 2px 0px;">
       
        <tr>
	     <td align="center"  class="listtit1"align="left"bgcolor="e1eef7"style="font-size: 15px">
		      <strong>图纸删除</strong> 
		</td>
		<td align="center"class="listtit1"align="left"bgcolor="e1eef7"style="font-size: 15px">
		      <strong>图纸添加</strong> 
		</td>
		<td></td>
        </tr>
       </table></td></tr>
</table>
<table width="897" border="0" align="center" cellpadding="0" cellspacing="1" height="233"><tr>
<td width="45%" valign = "top"class="listdrd">
<form name="frm"  METHOD=POST ACTION="paper_act.jsp">
<input type="hidden" name="<%=Constants.ACTION_TYPE%>" value="<%=Constants.DELETE_IMG%>" />
<input type="hidden" name="strHotSpotId" value="<%=strHotSpotId%>" />
<input type="hidden" name="strHotSpot" id="strHotSpot"value="<%=obj0.getClassOneAC() %>" />
<input type="hidden" name="classTwoAc"id="classTwoAc" value="<%=obj0.getClassTwoAC()%>" />

<table id="tb" width="97%" border="0" align="center" cellpadding="0" cellspacing="0">
 
 
  <tr>
    <td><table id="tb" width="98%" border="0" align="center" cellpadding="0" cellspacing="1"style="margin:10px 0px 10px 0px;" >
   		
   		 <!--<tr><td>XML文件：<%=obj1==null?"暂无":obj1.getClassTwoAC()%></td></tr>
      --><tr >
      <td  style="width: 71px" class="listdrd" bgcolor="e1eef7"><input style="border: 0px" type="checkbox" name="checkbox62" value="checkbox" onclick="selAll(document.all.strId)"/><strong>全选</strong></td>
        <td  width="80%" height="25" class="listdrd"align="center" bgcolor="e1eef7"><strong>已上传的图纸</strong></td>
        </tr>
      <%
             for (int i = 0;i < floors.size(); i++) {
            	    String f=   floors.get(i); 
            	    String floor = f+ "图纸";  
            %>
			      <tr>
			        <td   class=listdrd> <input style="border: 0px"  type="checkbox" name=strId value="<%=f %>" /> 
			       	                                        <input style="border: 0px"  type="hidden" name=floor value="<%=f %>" /> 
			        </td>                                                                             									   
			        
			        <td class="listdrd"><%=floor %></td>
			                            
			      </tr>      
        <%
            }//fo
         %> 
         
    </table>
     <table>
     
     <tr><td width="40%" height="30" align="center" valign="bottom"class="left_txt2"></td><td height="50" colspan="2" align="left">
     <input name="B1" type="button"   value="删除" onclick="del()"  class="ipt2" />&nbsp; &nbsp;
     <input name="B12" type="button"  onclick="window.location.href='paper_list.jsp';" value="返 回" class="ipt2" /></td>
                    </tr>
   </table>
    </td>
  </tr>
</table>
</form>
</td>
<td class="listdrd">
<form name="frm1" method="post" action="paper_act.jsp" enctype="multipart/form-data">
<input type="hidden" name="<%=Constants.ACTION_TYPE%>" value="<%=Constants.UPDATE_STR%>"/>
<input type="hidden" id="papernum"name="papernum" value=""/>
<input type="hidden" name="strHotSpotId" value="<%=strHotSpotId%>"/>
<input type="hidden" name="strHotSpot" id="strHotSpot"value="<%=obj0.getClassOneAC() %>"/>
<input type="hidden" name="classTwoAc"id="classTwoAc" value="<%=obj0.getClassTwoAC()%>"/>
<table  width="98%" border="0" align="center" cellpadding="0" cellspacing="0"style="margin:10px 0px 10px 0px;" >
 <tr>
   <td > <table>
     <tr> <td></td><td width="40%" height="30" align="right" class="left_txt2">上传图片：</td>
                <td align="left">
                   <div id="dvTitles"> <input type="file" id="firstFileId" name="firstFileId" value="" class="input_box" size="30" /><br/></div> 
               </td>
             </tr>
             <tr>
               <td></td><td width="40%" height="30" align="right" class="left_txt2"></td>
                <td align="left">
                       <input type="button" value="添加拓扑图片" onclick="addFile('dvTitles','file')" /> &nbsp;&nbsp;</td>
             </tr>
              <tr>
               <td></td><td width="40%" height="30" align="right" class="left_txt2">更新XML文件：</td>
                <td align="left">
                      <input id="strXML" name="strXML" type="file" value="" class="input_box" size="30" /></td>
             </tr>
             
              <tr>
               <td></td><td width="40%" height="20" align="right" class="left_txt2"></td>
                <td align="left">注意：请保持xml文件名与以前相同否则无法上传。
                       &nbsp;&nbsp;</td>
             </tr>
    </table>
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr > 
                <td  width="70%" height="30" align="right" valign="bottom" > 
                  <input name="B" type="button"   value="确定" onclick="chkFrm()"  class="ipt2" />
                  &nbsp; &nbsp; 
                 <input name="B12" type="button"  onclick="window.location.href='paper_list.jsp';" value="返 回" class="ipt2" />
                 </td>  
                <td  height="30" align="right" valign="bottom" >  
                  &nbsp; &nbsp;  
                 </td>              
            </tr> 
           
            </table></td></tr>
    </table>
</form>
</td>
</table>
</body>
</html>
<%@ include file="../include/jsp/footer.jsp"%>